﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Xc.Application;
using Xc.Core.Tools;
using Xc.DataObjects;

namespace Permissions.Web.Controllers
{
    public class HomeController : BaseController
    {
        public ActionResult Index()
        {

            //CookieHelper.SetCookie("Name", "xiaocong_soft");
            return View();
        }

        [Description("【主页】登陆")]
        public ActionResult Login()
        {
            return View();
        }

        [Description("【主页】获取用户菜单")]
        public ActionResult GetMenus()
        {
            var appService = new RoleModulesAppService();
            var roleId = "d6b37c4b-2785-e411-be84-dc0ea183c1fa".ToGuid();//SessionHelper.Get("RoleId");
            var modules = appService.GetMenus(roleId);
            return this.Content(JsonHelper.ToJsonString(modules, true));

           
        }
    }
}